<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>inline-height测试</title>
    <style>
        .box {
            width: 300px;
            /* height: 50px; */
            color: white;
            background-color: #f99;
            font-size: 14px;
            /* line-height: 50px; */

        }

        .text {
            background-color: #500;
        }

        img {
            background-color: aquamarine;
            width: 14px;
            height: 14px;
            /* margin-bottom: -2px; */
            vertical-align: baseline;
        }

        .split{
            height: 100px;
            background-color: cadetblue;
        }

        .block{
            display: inline-block;
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div style="background-color: green;">
        <span style="line-height: 5;background-color: burlywood;">xxxxxxpgfly国</span>
    </div>

    <hr />
    <div class="box">
        <span class="text">
            <span style="background-color: cadetblue;">
            <span>axgdX中文</span>
            <img src="https://www.baidu.com/favicon.ico"></img>
            x<span style="font-size: 20px;">x</span>
            <span style="font-size: 50px;">x国</span>
        </span>
        </span>
    </div>

    <hr />

    <div class="box">
        axgdX中文<img src="https://www.baidu.com/favicon.ico"></img>
    </div>

    <hr />

    <!-- 注意看，行内块元素和下方的div之间有一个间距 -->
    <img src="https://www.baidu.com/favicon.ico"></img>
    <div class="split"></div>

    <hr />
    
    
    <!-- 如果行内块元素内有文字，那么会有一种更加神奇的布局结果 -->
        <div class="block"></div>
        <div class="block">222</div>
    <div class="split"></div>
    <hr />
    
        
    <!-- 如果行内块元素内有其它元素，那么会有一种更加神奇的布局结果 -->
    <div class="block"></div>
    <div class="block">
        <div><div style="display: inline-block;width: 50px;height: 50px;background-color: bisque;"></div></div>
        
    </div>
    <div class="split"></div>
    <hr />
    
    <!-- 如果行内块元素内有文字，那么会有一种更加神奇的布局结果 -->
        
    <div id="test" style="border: 1px solid goldenrod;">
        <div class="block"></div>x
    </div>
</body>

</html>